<div id="indexcates">
        <div class="row-fluid" >
            <ul class="breadcrumb">
                <li>个人中心</li>
            </ul>
        </div>
            <?php
            if($_SESSION['sid']!=''){
                $query = "select * from ".DBPREFIX."member where id=".$_SESSION['sid'];
                $result =$db->query($query);
                $memberinfo = $db->fetch_array($result);
            }
            else{
                fs_showmsg('您还没有登陆!','?do=do');
            }
            ?>
        <div class="exam_list">
                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                   
                    <tr>
                        <td align="center" width="20%">用户名:</td><td><b><?php echo $memberinfo['passport']?></b></td>
                    </tr>
                    <tr>
                        <td align="center">真实姓名:</td><td><b><?php echo $memberinfo['realname']?></b></td>
                    </tr>
                    <tr>
                        <td align="center">上次登陆</td><td><b><?php echo date("Y-m-d H:i:s",$memberinfo['lastlogintime']);?></b></td>
                    </tr>
                    <?php 
                        if($memberinfo['type']==3){?>
<!--                     <tr>
                        <td align="center" width="20%">头像:</td><td><img src="<?php if($memberinfo['head']==''){echo 'resources/images/graduated.png';}else{echo $memberinfo['head'];}?>" alt="用户头像" height="50" width="50" /></td>
                    </tr>-->
                    <tr>
                        <td align="center">查看视频次数:</td><td><b><?php echo get_record(1);?>次</b></td>
                    </tr>
                    <tr>
                        <td align="center">下载文档次数:</td><td><b><?php echo get_record(2);?>次</b></td>
                    </tr>
                    <tr>
                        <td align="center">查看试卷次数:</td><td><b><?php echo get_record(3);?>次</b></td>
                    </tr>
                    <?php
                        }
                        ?>
                    <?php 
                        if($memberinfo['type']==2){?>
                    <tr>
                        <td align="center" width="20%">头像:</td><td><img src="<?php if($memberinfo['photo']==''){echo 'resources/images/user3.png';}else{echo "backstage/".$memberinfo['photo'];}?>" alt="用户头像" width="90"/></td>
                    </tr>
                    <tr>
                        <td align="center">上传视频个数:</td><td><b><?php echo get_count('videos','uploader',1);?>个</b></td>
                    </tr>
                    <tr>
                        <td align="center">上传文档个数:</td><td><b><?php echo get_count('courseware','writerid','');?>份</b></td>
                    </tr>
                    <tr>
                        <td align="center">上传试卷个数:</td><td><b><?php echo get_count('exam','exam_pubuid','');?>份</b></td>
                    </tr>
                    <?php
                        }
                        ?>
                    <?php 
                        if($memberinfo['type']==0){?>
<!--                    <tr>
                        <td align="center" width="20%">头像:</td><td><img src="<?php if($memberinfo['head']==''){echo 'resources/images/webmaster.png';}else{echo $memberinfo['head'];}?>" alt="用户头像" height="50" width="50"/></td>
                    </tr>-->
                    <tr>
                        <td align="center">本站视频总量:</td><td><b><?php echo get_all_count('videos');?></b></td>
                    </tr>
                    <tr>
                        <td align="center">本站文档总量:</td><td><b><?php echo get_all_count('courseware');?>份</b></td>
                    </tr>
                    <tr>
                        <td align="center">本站试题总量:</td><td><b><?php echo get_all_count('exam');?>份</b></td>
                    </tr>
                    <?php
                        }
                        ?>
                    <tr>
                        
                        <td align="center">Email:</td><td><b><?php echo $memberinfo['email'];?></b></td>
                    </tr>
                    <tr>
                        <td colspan="2"><input type="button" onclick="window.location.href='?do=editaccount&act=setpassword'" value="修改密码"/>&nbsp;&nbsp;&nbsp;<input type="button" onclick="window.location.href='?do=editaccount&act=profile'" value="修改资料"></td>
                    </tr>
                </table>
        </div>
        
</div>